{{ define "comment"}}
<!-- 评论部分 包括自己可以发出评论 看到别人的评论 -->
<div class="container">
    <section class="mb-10">
  
      <div class="row justify-content-center">
        <div class="col-lg-11 col-xl-8">
          <h5 class="mb-5 text-center">Comments</h5>
          {{ if .IfLoad }}
          <div class="d-flex mb-1">
            <div class="flex-shrink-0">
              <img class="rounded-circle" src="https://mdbootstrap.com/img/new/avatars/4.jpg"
                style="height: 50px; width: 50px;" alt="Generic placeholder image">
            </div>
            <div class="flex-grow-1 ms-2">
              <form action="">
                <div class="row">
                  <div class="col-md-12 mb-4">
                    <p class="h6 mb-3">Anna</p>
                    <div class="form-outline">
                      <textarea class="form-control" id="textAreaExampleComment" rows="4"></textarea>
                      <label class="form-label" for="textAreaExampleComment">Type...</label>
                    </div>
                  </div>
                </div>
              </form>
            </div>
          </div>
        {{ end }}

        {{ range showComment }}
          <div class="d-flex mb-5">
            <div class="flex-shrink-0">
              <img class="rounded-circle" src="/css/baoLan.jpg"
                style="height: 50px; width: 50px;" alt="Generic placeholder image">
            </div>
            <div class="flex-grow-1 ms-3 border-bottom" style="border-bottom: 2px solid #f5f5f5 !important">
              <p class="mb-2"><span class="h6">{{ .CName}}</span><span style="color: #ccc;"> • </span> <span
                  class="small text-muted">{{ .CTime }}</span></p>
              <p>{{ .CContent}}</p>
            </div>
          </div>

        </div>
      </div>
  
    </section> 
  </div>

 
{{ end }}